<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>同步和异步</title>
</head>
<body>
    <button>click</button>
    <script>
        const bu = document.querySelector('button');
        bu.addEventListener('click', function() {
            console.log(this.textContent);
            
        });

        console.log('1');
        console.log('2');
        setTimeout(function() {
            let date = new Date();
            console.log('time' + date.getTime());
        }, 3000);
        console.log('3');
        console.log('4');
        setTimeout(function() {
            let date = new Date();
            console.log('Time' + date.getTime());
        }, 3000)
    </script>
</body>
</html>